package com.jsmao.liteflowdemo.demos.web;

import cn.hutool.core.util.StrUtil;
import com.jsmao.liteflowdemo.demos.cmp.YourClass;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import org.springframework.beans.factory.annotation.Autowired;

@RestController
@RequestMapping("/web")
public class WebTestController {

    @Autowired
    private YourClass yourClass;

    @RequestMapping("/test")
    public String test(@RequestParam String chainId) {
        if (StrUtil.isNotBlank(chainId)) {
            yourClass.testConfig(chainId);
        }
        return "test";
    }
}